# coding=UTF-8
# 代码是不对的，历史原因保留
from const_ import *
with open("./data.txt") as f:
    lines = f.readlines()

word_dict = {}
with open("word_dict.txt","r") as f:
    lines2 = f.readlines()
    for line in lines2:
        temp = line.split(" ")
        word_dict[temp[0]] = int(temp[1].replace("\n",""))



with open("fake_test.txt",mode="w") as f:
    f.write("text")
    f.write("\n")
    for i,line in enumerate(lines):
        if i%3==0:
            new_sentence = replace_entity_in_logic_form(extract_question(line),lines[i+1]).replace("'"," ").replace("’"," ")
            f.write(new_sentence)
            f.write("\n")

